<?php

/**
 * 平台用户模型
 */

namespace App\Http\ManagerApi\Models;

use Illuminate\Database\Eloquent\Model;
use App\Api\Traits\Orm\PageTrait;

class User extends Model
{
    use PageTrait;

    protected $table = 'user';

    protected $hidden = ['password'];

    protected $guarded = [];

    /**
     * 关联推荐人模型
     */
    public function referee()
    {
        return $this->belongsTo('App\Http\ManagerApi\Models\User', 'recommend_code', 'my_recommend_code');
    }
}